require('dotenv').config();
console.log('Loaded environment variables:', process.env);
const pool = require('./src/config/database');

async function testConnection() {
  try {
    const connection = await pool.getConnection();
    console.log('Database connection successful!');
    connection.release();
  } catch (error) {
    console.error('Database connection failed:', error.message);
  } finally {
    await pool.end();
  }
}

testConnection();